# coding: UTF-8
# ----------
# Project_Name : pythonProject
# File_Name : 元素的基本操作.py
# Author : asus
# Date_Time:2022/4/21 15:24
# Description :
# ----------
from selenium import webdriver
import time

from selenium.webdriver.common.by import By
def foo1():
    """
    模拟键盘输入
    清空输入框clear()
    :return:None
    """
driver = webdriver.Chrome()
driver.maximize_window()

driver.get("http://www.baidu.com/")

driver.find_element(By.NAME, "wd").send_keys("51放假安排")  # 调用webelement里面的send_keys的值
time.sleep(5)

driver.quit()
if __name__=="__main__":  #
    foo1()  #ctrl  +  /   快捷注释
